package com.engineering.elink.common;

/**
 * 会员权限
 * @author hxjxiaojun
 *@time 2017年3月1日
 */
public enum MenberRoleEnum {
	
	/**
	 * 上传资料次数限制
	 */
	REGULAR_MEMBERS_UPLOAD("普通会员", 1), 
	REGISTER_TRAINEE_MEMBER_UPLOAD("实名注册会员-见习生",5),
	REGISTER_ASSISTANT_MEMBER_UPLOAD("实名注册会员-助理工程师",10),
	REGISTER_ENGINERR_MEMBER_UPLOAD("实名注册会员-工程师",10),
	REGISTER_SENIOR_ENGINERR_MEMBER_UPLOAD("实名注册会员-高级工程师",10),
	REGISTER_PROFESSOR_MEMBER_UPLOAD("实名注册会员-教授级高级工程师",15),
	REGISTER_MASTER_MEMBER_UPLOAD("实名注册会员-工程大师",20),
	ADVISER_MEMBER_UPLOAD("实名专家/顾问",0),//0表示不限

	/**
	 * 评论次数
	 */
	REGULAR_MEMBERS_COMMENT("普通会员", 1), 
	REGISTER_TRAINEE_MEMBER_COMMENT("实名注册会员-见习生",5),
	REGISTER_ASSISTANT_MEMBER_COMMENT("实名注册会员-助理工程师",10),
	REGISTER_ENGINERR_MEMBER_COMMENT("实名注册会员-工程师",10),
	REGISTER_SENIOR_ENGINERR_MEMBER_COMMENT("实名注册会员-高级工程师",10),
	REGISTER_PROFESSOR_MEMBER_COMMENT("实名注册会员-教授级高级工程师",15),
	REGISTER_MASTER_MEMBER_COMMENT("实名注册会员-工程大师",30),
	ADVISER_MEMBER_COMMENT("实名专家/顾问",0),//0表示不限
	
	/**
	 * 分享
	 */
	REGULAR_MEMBERS_SHARE("普通会员", -1), //-1表示没有,可删掉
	REGISTER_TRAINEE_MEMBER_SHARE("实名注册会员-见习生",5),
	REGISTER_ASSISTANT_MEMBER_SHARE("实名注册会员-助理工程师",10),
	REGISTER_ENGINERR_MEMBER_SHARE("实名注册会员-工程师",10),
	REGISTER_SENIOR_ENGINERR_MEMBER_SHARE("实名注册会员-高级工程师",10),
	REGISTER_PROFESSOR_MEMBER_SHARE("实名注册会员-教授级高级工程师",15),
	REGISTER_MASTER_MEMBER_SHARE("实名注册会员-工程大师",30),
	ADVISER_MEMBER_SHARE("实名专家/顾问",0);//0表示不限
	
	// 成员变量
	private String name;
	private int index;

	// 构造方法
	private MenberRoleEnum(String name, int index) {
		this.name = name;
		this.index = index;
	}

	// 普通方法
	public static String getName(int index) {
		for (MenberRoleEnum c : MenberRoleEnum.values()) {
			if (c.getIndex() == index) {
				return c.name;
			}
		}
		return null;
	}

	// get set 方法
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getIndex() {
		return index;
	}

	public void setIndex(int index) {
		this.index = index;
	}
	
	public String toString () {
		
		return "index=" + this.index + "&&name=" + this.name;
	}
}
